<% drag_id = model_to_drag_id(@project) %>

<% truncate_length_for_boxes = 22 -%>

<% if mine?(@project) || @project.can_be_edited_by?(current_user) -%>
  <ul class="sectionIcons">
    <li><%= icon('edit', edit_project_path(@project), "Edit Project Details", nil, 'Edit Project Details')%></li>
    <% if current_user.is_admin? -%>
      <li><%= icon "destroy", project_path(@project), "Delete Project", { :confirm => 'Are you sure?', :method => :delete }, "Delete Project" -%>
    <% end -%>
  </ul>
<% end -%>

<h1><%= h @project.name -%></h1>

<div class="show_basic">

  <div class="main_content_left_box">

    <div class="box_about_actor">
      <div class="web_page">
        <p>
          <label>Public Web page:</label>
          <%= text_or_not_specified(@project.web_page,:external_link=>true) %>
        </p>
      </div>

      <div class="wiki_page">
        <p>
          <label>Internal Web page:</label>
          <%= text_or_not_specified(@project.wiki_page,:external_link=>true) %>
        </p>
      </div>

      <p>
        <%= render :partial=>"organisms_tags", :object=>@project.organisms %>
      </p>

    </div>
  </div>
  <div class="main_content_right_box">
    <%= render :partial => "layouts/contribution_section_box_avatar", :locals => { :object => @project, :drag_id => drag_id } -%>
  </div>
  <div style="clear:both;">
    <p style="margin-top: 1em;">
      <b>About the project:</b>
      <div id="description" class="box_standout">
        <%= text_or_not_specified(@project.description, :description=>true) %>
      </div>
    </p>

    <%# get, classify and authorize all assets for this project -%>
    <% project_resource_hash = Asset.classify_and_authorize(@project.assets, true, current_user) -%>
    <% project_resource_hash.merge!(classify_for_tabs(@project.people)) -%>
    <% project_resource_hash.merge!(classify_for_tabs(@project.institutions)) -%>
    <% project_resource_hash.merge!(classify_for_tabs(@project.studies)) -%>

    <%= render :partial=>"layouts/items_related_to",:locals=>{:item_name=>@project.name,:item_hash=>project_resource_hash} %>

  </div>
</div>



